﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminSite.Master"
    Inherits="System.Web.Mvc.ViewPage<HYBYSoft.Company.Models.Category>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  
    <div id="content">
        <p>
            <span id="sitemap">当前位置：</span>
        </p>
        <% using (Html.BeginForm("Edit", "Category", FormMethod.Post, new { enctype = "multipart/form-data" }))
           { %>
        <%: Html.ValidationSummary(true) %>
        <%: Html.HiddenFor(model => model.State) %>
        <fieldset>
            <legend>修改<%: Model.Name %>信息</legend>
            <%: Html.HiddenFor(model=>model.CategoryID) %>
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Name) %>：
            </div>
            <div class="editor-field">
                <%: Html.EditorFor(model => model.Name) %>
                <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>
            <div class="editor-empty">
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(model => model.ParentName)%>：
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("ddlParent",(IEnumerable<SelectListItem>)ViewData["ddlParentID"])%>
            </div>
            <div class="editor-empty">
            </div>
            <div class="company-lableDes">
                <%: Html.LabelFor(model => model.Icon) %>：
            </div>
            <div class="company-fieldDes">
                <input type="file" name="FileUpload1" /><% Response.Write("<img src='../../../../UplodeImages/" + Model.Icon + "' style='width:150px;height:50px' />"); %>
            </div>
            <div class="editor-empty">
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Description) %>：
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.Description, new { @style = "width:500px;height:80px;" })%>
                <br />
            </div>
            <div class="editor-empty">
            </div>
            <center>
            <div style="margin-top: 10px; padding-top: 60px; padding-bottom: 8px;">
                <input type="submit" value="修改" />
            </div>
            </center>
        </fieldset>
        <% } %>
            <% Html.RenderPartial("partialBackLink"); %>
    </div>
</asp:Content>
